//
//  MainPageTableViewCell.m
//  SDHuiYuShoping
//
//  Created by luojiao on 2017/4/20.
//  Copyright © 2017年 luojiao. All rights reserved.
//

#import "MainPageTableViewCell.h"

@implementation MainPageTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [_cellButton addTarget:self action:@selector(checkButtonClick:) forControlEvents:UIControlEventTouchUpInside];
    [_cellButtonTwo addTarget:self action:@selector(checkButtonClick:) forControlEvents:UIControlEventTouchUpInside];
    
    [_buttonOne addTarget:self action:@selector(checkButtonClick:) forControlEvents:UIControlEventTouchUpInside];
    [_buttonTwo addTarget:self action:@selector(checkButtonClick:) forControlEvents:UIControlEventTouchUpInside];
    [_buttonThree addTarget:self action:@selector(checkButtonClick:) forControlEvents:UIControlEventTouchUpInside];
    
    [_oneButton addTarget:self action:@selector(checkButtonClick:) forControlEvents:UIControlEventTouchUpInside];
    [_twoButton addTarget:self action:@selector(checkButtonClick:) forControlEvents:UIControlEventTouchUpInside];
    [_threeButton addTarget:self action:@selector(checkButtonClick:) forControlEvents:UIControlEventTouchUpInside];

}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void)checkButtonClick:(id)sender
{
    UIButton *button = (UIButton *)sender;
    if (_delegate && [_delegate respondsToSelector:@selector(checkProductButton:)])
    {
        [_delegate checkProductButton:button];
    }
}

@end
